package com.base.hong.adapter

import android.widget.ImageView
import android.widget.TextView
import coil.load
import com.base.hong.R
import com.base.hong.model.ProjectListData
import com.base.hong.model.ProjectListEntity
import com.base.hong.utils.HUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class ProjectListAdapter :
    BaseQuickAdapter<ProjectListData, BaseViewHolder>(R.layout.item_project_list),LoadMoreModule{

    override fun convert(helper: BaseViewHolder, item: ProjectListData) {
        helper.getView<TextView>(R.id.tvTitle).text = item.title
        helper.getView<TextView>(R.id.tvContent).text = item.desc
        helper.getView<TextView>(R.id.tvTime).text = HUtils.formatDateYyyyMMddHHmm(item.publishTime)
        helper.getView<ImageView>(R.id.imageView).load(item.envelopePic)
    }
}